<?php
namespace app\admin\controller;

use app\common\logic\HelpGet;
use app\common\component\help_get\HelpGetService;

class Withdraw extends ControllerBase {
	public function index() {
		$this -> view -> assign('help_gets', (new HelpGetService()) -> getAll());

        return $this -> view -> fetch();
	}
	
	public function firstConfirmHelpGet() {
		$result = (new HelpGet()) -> firstConfirmHelpGet($this -> request -> get('help_get_id'));

		echo '<meta charset="utf-8"><script>alert("' . $result['message'] . '!");window.location.href="/shuashuale/withdraw";</script>';exit;
    }

    public function notFirstConfirmHelpGet() {
    	$result = (new HelpGet()) -> notFirstConfirmHelpGet($this -> request -> get('help_get_id'));

    	echo '<meta charset="utf-8"><script>alert("' . $result['message'] . '!");window.location.href="/shuashuale/withdraw";</script>';exit;
    }
}
?>